package com.ny.until;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DbUntil {
    private static final String URL = "jdbc:mysql://localhost:3306/userdb";
    private static final String username = "root";
    private static final String password = "123456";

    public Connection getCon() throws ClassNotFoundException, SQLException {
        Class.forName("com.mysql.cj.jdbc.Driver");
        Connection connection = DriverManager.getConnection(URL, username, password);
        return connection;
    }
}